package projectx.web.base;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionServlet;

public class ProjectXActionServlet extends ActionServlet {

	// --------------------------------------------------------------------------
	// M E T H O D S
	//
	// --------------------------------------------------------------------------
	public void init() throws ServletException {

		super.init();
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		super.doGet(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		super.doPost(request, response);
	}

	protected void process(HttpServletRequest request,
			HttpServletResponse response) throws IOException, ServletException {
		if (request.getSession(false) == null
				&& !request.getServletPath().equals("/forward.wss")) {
			response.sendRedirect(request.getContextPath() + "/forward.wss");
		} else {
			super.process(request, response);
		}
	}
}
